﻿@model MvcMusicStore.Album
@{
    Layout = "~/Views/Shared/_LayoutForAdmin.cshtml";
    ViewBag.Title = "Create";
}

<h2>Create album</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Create", "AlbumManager", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Album</legend>

        <div class="editor-label">
            Title
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.titleAlbum)
            @Html.ValidationMessageFor(model => model.titleAlbum)
        </div>

        <div class="editor-label">
          Year
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.yearAlbum)
            @Html.ValidationMessageFor(model => model.yearAlbum)
        </div>

        
        <div class="editor-label">
        Coust
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.coustAlbum)
            @Html.ValidationMessageFor(model => model.coustAlbum)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.idGenre, "Genre")
        </div>
        <div class="editor-field">
            @Html.DropDownList("idGenre", String.Empty)
            @Html.ValidationMessageFor(model => model.idGenre)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.idAuthor, "Author")
        </div>
        <div class="editor-field">
            @Html.DropDownList("idAuthor", String.Empty)
            @Html.ValidationMessageFor(model => model.idAuthor)
        </div>
        <div>
            <span class="editor-label">
                <label>
                    Choose cover picture to upload:
                </label>
            </span>
            <span class="editor-field">
                <input type="file" name="file" />
            </span>
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
